﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Microhard.Permission.Models;

namespace Microhard.Permission_MembershipImpl
{
    public static class LoginExtension
    {
        public static string GetCurrentUserName(this Controller ctr)
        {
            if (ctr.HttpContext.Request.IsAuthenticated)
            {
                return ctr.HttpContext.User.Identity.Name;
            }
            return string.Empty;
        }

    }
}
